package cn.wbnull.springbootdemo.service.serviceImple;

import cn.wbnull.springbootdemo.enity.Direction;
import cn.wbnull.springbootdemo.enity.Player;
import cn.wbnull.springbootdemo.service.PlyerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import cn.wbnull.springbootdemo.enity.Position;
import java.awt.*;

/*
 * @Author:大力王
 * @Date:2025/7/1-01-17:53
 * 开始了
 */
@Service
public class PlyerServiceImple implements PlyerService {

    @Resource
    public Player player;
    @Override
    public Player getPlayer(String id, String name, Position startPos, Direction direction, Color color) {
        player.setId(id);
        player.setName(name);
        player.getPositionSnake().add(startPos);
        player.setDirection(direction);
        player.setColor(color);
        return player;
    }

    @Override
    public Position getHead() {
        return null;
    }
}
